<template>
	<view class="fullContent bgf8">
		<view class="bgw pd30" style="margin-bottom: 30upx;">
			<uni-list>
				<uni-list-item class="avatar" title="头像" showArrow clickable>
					<template slot="footer">
						<img v-if="myInfo.avatar" class="avatarImg" :src="baseUrl+myInfo.avatar" mode="widthFix"></img>
						<img v-else class="avatarImg" src="../../static/bg/Myprescription1.png" mode="widthFix"></img>
					</template>
				</uni-list-item>
				<uni-list-item title="姓名" :rightText="myInfo.name"></uni-list-item>
				<uni-list-item title="手机号码" :rightText="myInfo.phone"></uni-list-item>
				<uni-list-item title="所属医馆" :rightText="myInfo.company_title"></uni-list-item>
				<uni-list-item title="所在科室" :rightText="myInfo.keshi"></uni-list-item>
				<uni-list-item class="avatar" title="医师职称">
					<template slot="footer">
						<view class="docSign">
							<img src="../../static/bg/docSign.png" mode=""></img>
							{{myInfo.zhicheng}}
						</view>
					</template>
				</uni-list-item>
			</uni-list>
		</view>
		
	<!-- 	<view class="bgw  pd30" style="margin-bottom: 30upx;">
			<uni-list>
				<uni-list-item v-if="myInfo.info.online_diagnosis_status == 1" title="线上看诊" rightText="开启"></uni-list-item>
				<uni-list-item v-else title="线上看诊" rightText="关闭"></uni-list-item>
				<uni-list-item v-if="myInfo.info.advisory_price == 0 || !myInfo.info.advisory_price" title="咨询费" rightText="免费"></uni-list-item>
				<uni-list-item v-else title="咨询费">
					<template slot="footer">
						<view class="detail">
							{{myInfo.info.advisory_price}}￥
						</view>
					</template>
				</uni-list-item>
				
				<uni-list-item title="线上诊费">
					<template slot="footer">
						<view class="detail">
							{{myInfo.info.diagnosis_price}}￥
						</view>
					</template>
				</uni-list-item>
			</uni-list>
		</view> -->
		<!-- <view class="bgw  pd30" style="margin-bottom: 30upx;">
			<uni-list>
				<uni-list-item v-if="myInfo.auth == 1" title="认证信息" rightText="去查看" showArrow clickable @click="goAuthInfo">
				</uni-list-item>
				<uni-list-item v-else class="hasNoData" title="认证信息" rightText="未设置" showArrow clickable @click="goAuthInfo">
				</uni-list-item>
			</uni-list>
		</view> -->
		<view class="bgw  pd30" style="margin-bottom: 30upx;">
			<uni-list>
				<uni-list-item class="avatar" title="专业擅长" :rightText="myInfo.sc">
				</uni-list-item>
				<uni-list-item class="avatar" title="个人简介" :rightText="myInfo.comment">
				</uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script>
	import {
		doctor_info
	} from '../../request/api.js'
	export default {
		data() {
			return {
				id:'',
				baseUrl:'',
				myInfo: {
					id:'',
					avatar: "",
					comment: "",
					jiezhen: 0,
					keshi: "",
					name: "",
					phone: "",
					price: "",
					sc: "",
					zhicheng: ""
				}
			};
		},
		onLoad(options) {
			this.id = options.id
			this.baseUrl = getApp().globalData.baseUrlImg;
			this.getMyInfo()
		},
		methods: {
			// 获取用户信息
			getMyInfo() {
				doctor_info({id:this.id}).then(res => {
					this.myInfo = res.data
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .avatar {
		.uni-list-item__content {
			justify-content: center;
		}
	}
	::v-deep .hasNoData{
		.uni-list-item__extra-text{
			color: #9F9F9F;
		}
	}
	::v-deep .uni-list-item__content-title {
		font-size: 28upx;
		color: #414141;
		white-space: nowrap;
	}

	::v-deep .uni-icons {
		padding: 0;
	}

	::v-deep .uni-list-item__container {
		padding-left: 0;
		padding-right: 0;
	}
	::v-deep .uni-list-item__extra-text{
		color: #000000;
		font-size: 28upx;
		width: 460upx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		text-align: right;
	}
	::v-deep .uni-list--border-top{
		height: 0px;
	}
	.avatarImg {
		width: 96upx;
		height: 96upx;
		border-radius: 50%;
	}
	.docSign{
		width: 188upx;
		height: 54upx;
		border: 1px solid #BC9869;
		opacity: 1;
		border-radius: 28upx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28upx;
		
		color: #BC9869;
		img{
			width: 32upx;
			height: 32upx;
			margin-right: 8upx;
		}
	}
	.detail{
		color: #F86C53;
	}
</style>
